<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button onclick="hello(this)">click</button>
<script>


    function hello(obj){
     var html='';
    html=html + '名称<input type="text" name="name"/>';
    html=html+'<button >保存</button>';
    //obj.innerHTML="<span type='color:red'>点击了我</span>'>";
    obj.innerHTML=html;
   // console.log(this);

    }3
</script>
</body>
</html>